<template>
<div class="wrap">
  <swiper :options="swiperOption">
    <swiper-slide v-for="item of Swiperlist" :key="item.id"><img class="swiperimg" :src="item.url"></swiper-slide>
  </swiper>
  <div class="swiper-pagination"></div>
</div>
</template>
<script>
import 'swiper/dist/css/swiper.css'
import { swiper, swiperSlide } from 'vue-awesome-swiper'
export default {
  name: 'Swiper',
  components: {
    swiper,
    swiperSlide
  },
  data () {
    return {
      swiperOption: {
        autoplay: 3000,
        speed: 1000,
        pagination: '.swiper-pagination',
        loop: true
      },
      Swiperlist: [
        {
          id: '0001',
          url: 'http://img1.qunarzz.com/piao/fusion/1810/6e/4a5551bbb189d902.jpg_750x200_25257467.jpg'
        },
        {
          id: '0002',
          url: 'http://img1.qunarzz.com/piao/fusion/1809/d4/e298dff35d3af802.jpg_750x200_9b0d56c1.jpg'
        },
        {
          id: '0003',
          url: 'http://img1.qunarzz.com/piao/fusion/1811/7c/8e5c4ab8ee8b7402.jpg_750x200_dd7a38dd.jpg'
        }
      ]
    }
  }
}
</script>
<style lang="stylus" scoped>
  .wrap>>> .swiper-pagination-bullet-active
    background:#fff
  .wrap>>> .swiper-pagination-bullet
      margin:3px
  .wrap
    width:100%
    overflow:hidden
    position:relative
    height:0
    padding-bottom:27%
    background:#eee
    .swiperimg
      width:100%
      height:100%
    .swiper-pagination
      bottom:0
      left:50%
      margin-left:-18px
</style>
